import request from '@/utils/request'

// 获取微信扫码登录信息
export const getQRCodeUrl = (params) => {
  return request({
    url: '/qx/api/user/wx/account/getQRCodeUrl',
    method: 'get',
    params
  })
}

// 查询是否登录
export const checkLogin = (params) => {
  return request({
    url: '/qx/api/user/user/checkLogin',
    method: 'get',
    params
  })
}

// 图形验证码
export const getCode = (params) => {
  return request({
    url: '/qx/api/code',
    method: 'get',
    params
  })
}

// 登录-发送验证码
export const sendSMS = (data) => {
  return request({
    url: '/qx/api/user/user/sendSMS?phone=' + data.phone,
    method: 'post',
    data: {
      uuid: data.uuid,
      code: data.code
    }
  })
}

// 绑定手机号
export const registrations = (data) => {
  return request({
    url: '/qx/api/user/user/registrations',
    method: 'post',
    data
  })
}